from core.support import set_cutscene, get_game
from core.item import Item
from core.action import Action

class Latte(Item):
    def __init__(self):
        Item.__init__(self, "Latte")    # do basic initialization for every item
        self.add_action(DrinkLatte)
    def get_description(self):
        return "Starbucks Latte"
    
class DrinkLatte(Action):
    def __init__(self):
        Action.__init__(self, "drinkup")

    # return description of action (used in label on webpage)
    def get_description(self):
        return "Drink that Latte up!"
    
    def get_method(self):
        return "post"

    def do_action(self,game,room,request):
        game = get_game()
        player = game.get_player()
        player.inventory.pop('Latte', None)
        player.add_status("JUICED")
        set_cutscene("JUICED!! With energy like this you could do anything! Maybe you can use this energy to muscle your way out the front door...")
        return